﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebAsp.DTO
{
    public class NewsDTO
    {
        public int ID { get; set; }
        public string Title { get; set; }
        public string Summary { get; set; }
        public string Contents { get; set; }
        public string ImagesLink { get; set; }
        public string CategoryName { get; set; }
        public int CategoryID { get; set; }

        public NewsDTO() { }
        // Danh sách tin
        public NewsDTO(int ID, string Title)
        {
            this.ID = ID;
            this.Title = Title;
        }
        //  Nội dung tin tức
        public NewsDTO(int ID, string Title, string Summary, string Contents, string ImagesLink)
        {
            this.ID = ID;
            this.Title = Title;
            this.Summary = Summary;
            this.Contents = Contents;
            this.ImagesLink = ImagesLink;
        }
        // Danh sách tin trong back-end
        public NewsDTO(int ID, string Title, string Summary, string Contents, string ImagesLink, string CategoryName)
        {
            this.ID = ID;
            this.Title = Title;
            this.Summary = Summary;
            this.Contents = Contents;
            this.ImagesLink = ImagesLink;
            this.CategoryName = CategoryName;
        }
        // Insert
        public NewsDTO(string Title, string Summary, string Contents, string ImagesLink, int CategoryID)
        {
            this.ID = ID;
            this.Title = Title;
            this.Summary = Summary;
            this.Contents = Contents;
            this.ImagesLink = ImagesLink;
            this.CategoryID = CategoryID;
        }
    }
}